home *** CD-ROM | disk | FTP | other *** search
- /*****
- * cTestWindow.c
- *
- * The window routines for the cTest demo
- *
- *****/
-
- #include <Packages.h>
- #include "cTestWindow.h"
-
- WindowPtr cTestWindow;
- Rect dragRect;
- Rect windowBounds = { 140, 40, 200, 250 };
-
- extern unsigned long menuDate;
-
- /****
- * SetUpWindow()
- *
- * Create the cTest window, and open it.
- *
- ****/
-
- void SetUpWindow(void)
-
- {
- dragRect = screenBits.bounds;
-
- cTestWindow = NewWindow(0L, &windowBounds, "\pCalendar Menu", true, noGrowDocProc, (WindowPtr) -1L, true, 0);
- SetPort(cTestWindow);
- }
- /* end SetUpWindow */
-
-
- /*****
- * DrawcTest()
- *
- * Draws the date.
- This is a quick sample only. You should draw a better popup with a triangle at least.
- *
- *****/
-
- void DrawcTest(short active)
-
- {
- Rect myRect, box;
- int color = true;
- Str255 temp;
-
- SetPort(cTestWindow);
- SetRect( &box, 0,0,300,300 );
- EraseRect( &box );
- SetRect( &box, 120,20,190,40 );
- FrameRect( &box );
-
- TextFont( 0 );
- IUDateString(menuDate, 0, temp );
- MoveTo( box.left+5, box.top+14);
- DrawString( temp );
-
- MoveTo( 50,33 );
- DrawString( "\pPopup Date:");
- }
- /* end DrawcTest */